<template>
	<view class="mons">
		<view class="top">
			<view class="mo">
				<view class="head">
					<image src="../../static/img/3/3-67.png" mode="widthFix"></image>
				</view>
				<view class="name">
					做任务 领福利
				</view>
			</view>
			<image class="bac" src="../../static/img/3/3-66.png"></image>
		</view>
		<navigator url="/pages/user/myjf" class="quer" v-if="users != null">
			<view class="quer-l">
				总积分
				<view>
					{{users.iPoints}}
				</view>
			</view>
			<view class="quer-l">
				可用积分
				<view>
				{{users.iPoints}}
				</view>
			</view>
		</navigator>
		<view class="list">
			<view  class="li" v-for="l in data" :key='l.type' >
				<view class="lef">
					{{l.name}}
					<text>积分 +{{l.value}}</text>
				</view>
				<view class="rig" v-if='l.status == 0' >
					<view class="buton bun">
						做任务
					</view>
				</view>
				<view class="rig" v-if='l.status > 0' style="color: #DD524D;">
					+10
				</view>
				<view class="both"></view>
			</view>
		</view>
		<view class="meng" v-if="meng">
			<view class="tan">
				<view class="close">
					<view class="clo-b" @click="close">
						<image src="../../static/img/3/3-1.png" mode="widthFix"></image>
					</view>
				</view>
				<view class="h3">
					领取成功
				</view>
				<image src="../../static/img/3/3-69.png" mode="widthFix" class="ck"></image>
				<view class="p">新手奖励领取成功</view>
				<view class="p sp">
					获得成长值 +10 获得优币 +5
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "",
		components: {

		},
		data() {
			return {
				meng:false,
				data:[],
				users:null
			}
		},
		onLoad() {
			
			var that = this;
			that.$Request.post(
				that.$api.httpApi.user.userinfo + '&token=' + that.$SysCache.get('token'),
			).then(user => {
				if (user.code == 200) {
					that.users = user.data;
					that.$Request.post4(
						that.$api.httpApi.user.task,{mid:user.data.id}
					).then(res => {
						
						if (res.code ==1) {
							that.data=res.data
						}
					});
				}
			});
		},
		methods:{
			close(){
				this.meng=false
			}
		}

	}
</script>

<style scoped>
	.tan .h3{
		font-size:34rpx;
		font-family:Microsoft YaHei;
		font-weight:400;
		color:rgba(92,92,92,1);
		text-align: center;
		margin-top: 50rpx;
	}
	.tan .ck{
		display: block;
		width:154rpx;
		height:154rpx;
		background:rgba(240,64,111,1);
		border-radius:50%;
		margin: auto;
		margin-top: 129rpx;
		margin-bottom: 32rpx;
	}
	.tan .p{
		font-size:22rpx;
		font-family:Microsoft YaHei;
		font-weight:400;
		color:rgba(92,92,92,1);
		text-align: center;
	}
	.tan .sp{
		color: #959595;
		margin-top: 21rpx;
	}
	.tan{
		position: absolute;
		width:574rpx;
		height:712rpx;
		background:rgba(255,255,255,1);
		border-radius:15rpx;
		margin: auto;
		top: 0;
		left: 0;
		bottom: 0;
		right: 0;
		overflow: hidden;
	}
	.tan .close{
		text-align: right;
	}
	.tan .close .clo-b{
		display: inline-block;
		width: 50rpx;
		text-align: center;
		line-height: 50rpx;
	}
	.tan .close .clo-b image{
		display: inline-block;
		width: 22rpx;
		vertical-align: middle;
	}
	.meng{
		background:rgba(0,0,0,0.7);
		position: absolute;
		z-index: 15;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}
	.both{
		display: block;
		clear: both;
	}
	.quer{
		background: #fff;
		padding-bottom: 45rpx;
		padding-top: 45rpx;
		display: flex;
		margin-bottom: 10rpx;
	}
	.quer .quer-l{
		flex: 1;
		border-right: 1px solid #E4E4E4;
		text-align: center;
		font-size:22rpx;
		font-family:Microsoft YaHei;
		font-weight:400;
		color:rgba(124,124,124,1);
	}
	.quer .quer-l:nth-child(2){
		border-right: 0;
	}
	.quer .quer-l view{
		font-size: 30rpx;
		color: #F0406F;
	}
	.list .li {
		margin-bottom: 1px;
		background: #fff;
		padding-left: 20rpx;
		padding-right: 20rpx;
		padding-bottom: 30rpx;
		padding-top: 30rpx;
		font-size: 26rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: rgba(102, 102, 102, 1);
	}
.list .li .lef{
	float: left;
	width: 70%;
}
	.list .li .rig {
		display: inline-block;
		float: right;
	}
	.list .li text{
		display: block;
		font-size: 18rpx;
		color: #9D9D9D;
	}
		.list .li .rig .buton{
			width:102rpx;
			height:40rpx;
			background:rgba(240,64,111,1);
			border-radius:20rpx;
			font-size:20rpx;
			font-family:Microsoft YaHei;
			font-weight:400;
			color:rgba(255,255,255,1);
			text-align: center;
			line-height:40rpx ;
			margin-top: 8rpx;
		}
		.list .li .rig .bun{
			background:rgba(201,167,110,1);
		}
	.list .li .rig image {
		display: inline-block;
		width: 16rpx;
		vertical-align: middle;
		margin-left: 19rpx;
	}

	.list .li .rig text {
		display: inline-block;
		vertical-align: middle;
	}
.list .li .bann{
	display: block;
	float: left;
	width:55rpx;
	height:55rpx;
	border-radius: 50%;
	margin-top: 5rpx;
	margin-right: 23rpx;
}
	uni-page-body {
		height: 100%;
	}

	.mons {
		height: 100%;
		background: #EEEEEE;
	}

	.top {
		background: url(../../static/img/3/3-66.png) no-repeat;
		background-size: 100% 100%;
		padding-top: 75rpx;
		padding-bottom: 75rpx;
		position: relative;
	}

	.top .mo {
		position: relative;
		z-index: 10;
	}

	.top .bac {
		display: block;
		position: absolute;
		left: 0;
		top: 0;
		width: 100%;
		height: 100%;
		z-index: 5;
	}

	.head {
		width: 86rpx;
		display: block;
		margin: auto;
	}

	.head image {
		display: block;
		width: 100%;
		margin: auto;
	}

	.name {
		text-align: center;
		font-size: 32rpx;
		font-family: Microsoft YaHei;
		font-weight: 400;
		color: rgba(255, 255, 255, 1);
		margin-top: 17rpx;
	}
</style>
